<template>
  <div>
    <div class="header">
      <div class="header-one" @click="$router.push('/')"><img src="@/assets/images/detail/download.png" alt=""></div>
      <ul>
        <li  @click="active===1"><a href="#goods" :class="active==1?'active':''">商品</a></li>
        <li @click="active===2"><a href="#ping" :class="active==2?'active':''" >评论</a></li>
        <li @click="active===3"><a href="#xaing" :class="active==3?'active':''" >详情</a></li>
        <li @click="active===4"><a href="#tui" :class="active==4?'active':''" >推荐</a></li>
      </ul>
    </div>
    <Goods  id="goods"/>
    <Comments id="ping"/>
    <Xiang id="xaing"/>
    <Tui  id="tui" />
  </div>
</template>

<script>
import Goods from "@/components/detail_ja/Detail_goods.vue";
import Comments from '@/components/detail_ja/Detail_comments.vue'
import Xiang from '@/components/detail_ja/Detail_xiang.vue'
import Tui from '@/components/detail_ja/Detial_tui.vue'
export default {
  data() {
    return {
      active:1
    };
  },
  props:['detailData'],
  components:{
    Goods,
    Comments,
    Xiang,
    Tui
  },
 
};
</script>
 
<style lang = "less" scoped>
*{
    text-decoration: none;
    font-size: 3.4vw;
}
.header {
  width: 100%;
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  background: #fff;
  .header-one {
    width: 15%;
    height: 10vw;
     line-height: 10vw;
        text-align: center;
      
      
        img{
          height: 3.4vw;
          width: 3.4vw;
        }
  }
  ul {
    display: flex;
    width: 80%;
    li{
        width: 20%;
        height: 10vw;
        line-height: 10vw;
        text-align: center;
        
        a{
            color: #000;
        }
        .active{
          color: red;
        }
    }
  }
}
#goods{
  margin-top:10vw ;
}


</style>